{/* LAYOUT模板 */}
	<layout name="layout"/>
{/* LAYOUT模板 */}

{/* import Js,Css */}
	<js href="__PUBLIC__/js/admin/listTable.js"/>
	<js href="__PUBLIC__/js/admin/js.util.js"/>
	<css href="__PUBLIC__/css/admin/common.css"/>
	<js href="__PUBLIC__/js/admin/js.selectzone.js"/>
	
	<css href="__PUBLIC__/css/jquery-ui.css" />
	<js href="__PUBLIC__/js/core/jquery-ui.1.10.4.js" />
	<js href="__PUBLIC__/js/core/plugins.js"/>
{/* import js,css */}

<!-- [position] -->
	<include file="Template:position"/>
<!-- [position] -->


<script>
var thisfile = '{$thisfile}';
var deleteck = '{$lang.deleteck}';
var deleteid = '{$lang.delete}';
</script>
<div class="form-div">
	<form action="{$thisfile}" method="post">
		文章搜索
		<input type="hidden" name="act" value="list" />
		<input name="goods_name" type="text" size="25" /> 
		<input type="submit" value="搜索" />
	</form>
</div>

<div class="list-div" id="listDiv">
	<form method="post" action="" name="listForm">
		<table class="table" cellspacing='1' cellpadding='3' width="100%">
			<tr>
				<th width="5%">
					<input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox">编号
				</th>
				<th>文章名称</th>
				<th width="25%">发布时间</th>
				<th width="25%">取消时间</th>
				<th width="10%">操作</th>
			</tr>
			<volist name="goodsdb" id="val">
			<tr>
				<td>
					<input name="checkboxes[]" type="checkbox" value="{$val.goods_id}" />{$val.goods_id}
				</td>
				<td>{$val.goods_name}</td>
				<td align="left">
					<span onclick="listTable.edit(this, 'edit_starttime', '{$val.goods_id}');showCalendar(this.firstChild, '%Y-%m-%d', false, false, this.firstChild)">
						<if condition="$val['starttime']">
							{$val.starttime}
						<else/>
							0000-00-00
						</if>
					</span>
				</td>
				<td align="left">
					<span onclick="listTable.edit(this, 'edit_endtime', '{$val.goods_id}');showCalendar(this.firstChild, '%Y-%m-%d', false, false, this.firstChild)">
						<if condition="$val['endtime']">{$val.endtime}<else/>0000-00-00</if>
					</span>
				</td>
				<td align="left">
					<span id="del{$val.goods_id}">
						<if condition="$val['endtime'] or $val['starttime']">
						<a href="{$thisfile}?goods_id={$val.goods_id}&act=del" onclick="return confirm('{$lang.deleteck}');">{$lang.delete}</a>
						<else/>
						-
						</if>
					</span>
				</td>
			</tr>
			</volist>
		</table>
	</form>
</div>

<script type="Text/Javascript" language="JavaScript">

	function validate(name){
		if(document.listForm.elements["date"].value == "0000-00-00"){
			alert('{$lang.select_time}');
			return;	
		}
		else{
			document.listForm.act.value=name;
			document.listForm.submit();
		}
	}
</script>

